1800
How can I highlight somehow the child bars of a summary bar

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Color := $f0f0f0;
	end;
	with Items do
	begin
		hSummary := AddItem('Summary');
		AddBar(hSummary,'Project Summary','1/2/2001','1/2/2001','',Nil);
		hTask := InsertItem(hSummary,Nil,'Task A');
		AddBar(hTask,'Task','1/2/2001','1/5/2001','K1',Nil);
		hTask := InsertItem(hSummary,Nil,'Task B');
		AddBar(hTask,'Task','1/4/2001','1/8/2001','K2',Nil);
		hTask := InsertItem(hSummary,Nil,'Task C');
		AddBar(hTask,'Task','1/6/2001','1/10/2001','K3',Nil);
		ExpandItem[hSummary] := True;
		DefineSummaryBars(hSummary,'',-1,'<*>');
		ItemBar[hSummary,'',EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor] := TObject(65536);
		ItemBar[hSummary,'',EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColorTransparent] := TObject(50);
	end;
	EndUpdate();
end
1799
How do I change the color for the selected bars, without showing the frame arround

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		SelBarColor := $7f0000ff;
		PaneWidth[False] := 48;
	end;
	Columns.Add('Task');
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2002','1/4/2002','A',Nil);
		AddBar(AddItem('Task 2'),'Task','1/6/2002','1/10/2002','B',Nil);
		AddBar(AddItem('Task 3'),'Task','1/11/2002','1/14/2002','C',Nil);
		ItemBar[0,'<A B>',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
	end;
	EndUpdate();
end
1798
Is it possible to enumerate the activities/bars of critical path

// BarResize event - Occurs when a bar is moved or resized.
procedure TWinForm1.AxG2antt1_BarResize(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent);
begin
	with AxG2antt1 do
	begin
		Items.SchedulePDM(e.item,TObject(e.key));
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 96;
		Bars.Item['Task'].Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>';
	end;
	with Items do
	begin
		hSummary1 := AddItem('Summary');
		ItemBold[hSummary1] := True;
		AddBar(hSummary1,'Summary','1/2/2001','1/2/2001','sum',Nil);
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001',Nil,Nil);
		DefineSummaryBars(hSummary1,'sum',h1,'');
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/4/2001',Nil,Nil);
		DefineSummaryBars(hSummary1,'sum',h2,'');
		AddLink('L1',h1,'',h2,'');
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/4/2001',Nil,Nil);
		DefineSummaryBars(hSummary1,'sum',h3,'');
		AddLink('L2',h2,'',h3,'');
		h4 := AddItem('Task 4');
		AddBar(h4,'Task','1/2/2001','1/4/2001',Nil,Nil);
		DefineSummaryBars(hSummary1,'sum',h4,'');
		AddLink('L3',h1,'',h4,'');
		DefSchedulePDM[EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathBarColor] := TObject(65280);
		SchedulePDM(h1,'');
	end;
	EndUpdate();
end
1797
How can I add a SF link

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '12/25/2000';
		PaneWidth[False] := 48;
		LevelCount := 2;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/5/2001','K2',Nil);
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/5/2001','K3',Nil);
		h4 := AddItem('Task 4');
		AddBar(h4,'Task','1/2/2001','1/5/2001','K4',Nil);
		h5 := AddItem('Task 5');
		AddBar(h5,'Task','1/2/2001','1/5/2001','K5',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		AddLink('L3',h3,'K3',h4,'K4');
		AddLink('L4',h4,'K4',h5,'K5');
		Link['L4',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(0);
		Link['L4',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(2);
		Link['L4',EXG2ANTTLib.LinkPropertyEnum.exLinkColor] := TObject(65280);
		SchedulePDM(0,'K5');
	end;
	Chart.ShowLinks := EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks;
	EndUpdate();
end
1796
How do I get the Start and End date of a bar

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	Debug := True;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		LevelCount := 2;
		PaneWidth[False] := 96;
	end;
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006','K1',Nil);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/25/2006','K2',Nil);
		AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006','K3',Nil);
		h := ItemByIndex[1];
		ItemBold[h] := True;
		OutputDebugString( 'Start of ' );
		OutputDebugString( FirstItemBar[h] );
		OutputDebugString( ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarStart] );
		OutputDebugString( 'End of  ' );
		OutputDebugString( FirstItemBar[h] );
		OutputDebugString( ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd] );
	end;
	EndUpdate();
end
1795
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)

with AxG2antt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
	end;
end
1794
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Caption := 'This is your new caption for print and print preview';
		AutoRelease := False;
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
1793
Is it possible to specify the A4 paper size for the print preview
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Settings[0] := TObject(9);
		AutoRelease := False;
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
1792
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		PageOrientation := 2;
		AutoRelease := False;
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
1791
How do I prevent a caption outside the bar from overlapping other bars

with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 48;
		Bars.Copy('Task','Default-Task');
		Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','A1','task');
		ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		AddBar(h,'Task','1/6/2001','1/10/2001','A2','task');
		ItemBar[h,'A2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(16);
		h := AddItem('Task 2');
		AddBar(h,'Default-Task','1/2/2001','1/4/2001','A1','task');
		ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		AddBar(h,'Default-Task','1/6/2001','1/10/2001','A2','task');
		ItemBar[h,'A2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(16);
	end;
	EndUpdate();
end
1790
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Clip');
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	with Chart do
	begin
		AllowResizeChart := Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader);
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
		FirstVisibleDate := '12/23/2000';
		LevelCount := 2;
		PaneWidth[False] := 216;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			Color := $a4a4a4;
			StartColor := $f0f0f0;
			EndColor := StartColor;
			OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
			Height := 15;
		end;
		MinUnitWidth := UnitWidth;
	end;
	with Items do
	begin
		h := AddItem('no clip, (0-2)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, right(<b>2</b>)';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(2);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, center(<b>1</b>)';
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(1);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3','');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, left(<b>0</b>)';
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(0);
		h := AddItem('clip, inside (3-5)');
		AddBar(h,'Task','12/28/2000','1/8/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'clip, inside, right(<b>5</b>)';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(5);
		AddBar(h,'Task','12/28/2000','1/8/2001','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'clip, inside, center(<b>4</b>)';
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(4);
		AddBar(h,'Task','12/28/2000','1/8/2001','K3',Nil);
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'clip, inside, left(<b>3</b>)';
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(3);
		h := AddItem('hide on min width, clip if not fit, inside (6-8)');
		AddBar(h,'Task','12/26/2000','1/10/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'hide on min width, clip if not fit, inside, right(<b>8</b>)';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(8);
		AddBar(h,'Task','12/26/2000','1/10/2001','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'hide on min width, clip if not fit, inside, center(<b>7</b>)';
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(7);
		AddBar(h,'Task','12/26/2000','1/10/2001','K3',Nil);
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'hide on min width, clip if not fit, inside, left(<b>6</b>)';
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(6);
		h := AddItem('hide if not fit, no clip, inside (9-11)');
		AddBar(h,'Task','12/28/2000','1/8/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'hide if not fit, no clip, inside, right(<b>11</b>)';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(11);
		AddBar(h,'Task','12/28/2000','1/8/2001','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'hide if not fit, no clip, center(<b>10</b>)';
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(10);
		AddBar(h,'Task','12/28/2000','1/8/2001','K3',Nil);
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'hide if not fit, no clip, inside, left(<b>9</b>)';
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(9);
		h := AddItem('no clip, inside, outside (12-14)');
		AddBar(h,'Task','12/28/2000','1/8/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, inside, outside, right(<b>14</b>)';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(14);
		AddBar(h,'Task','12/28/2000','1/8/2001','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, inside, outside, center(<b>13</b>)';
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(13);
		AddBar(h,'Task','12/28/2000','1/8/2001','K3',Nil);
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, inside, outside, left(<b>12</b>)';
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(12);
		h := AddItem('no clip, outside (16-18)');
		AddBar(h,'Task','12/30/2000','1/6/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, outside, right(<b>18</b>)';
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(18);
		AddBar(h,'Task','12/30/2000','1/6/2001','K2',Nil);
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, outside, center(<b>17</b>)';
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(17);
		AddBar(h,'Task','12/30/2000','1/6/2001','K3',Nil);
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'no clip, outside, left(<b>16</b>)';
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
	end;
	EndUpdate();
end
1789
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(5);
	end;
	EndUpdate();
end
1788
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(4);
	end;
	EndUpdate();
end
1787
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(3);
	end;
	EndUpdate();
end
1786
What options do I have to show the links between bars (straight)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(2);
	end;
	EndUpdate();
end
1785
What options do I have to show the links between bars (direct)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(1);
	end;
	EndUpdate();
end
1784
What options do I have to show the links between bars (round)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(-1);
	end;
	EndUpdate();
end
1783
What options do I have to show the links between bars (rectangular, default)

with AxG2antt1 do
begin
	BeginUpdate();
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		NonworkingDays := 0;
		LinksWidth := 2;
	end;
	with Items do
	begin
		AddItem('');
		h3 := AddItem('Task 3');
		AddItem('');
		AddBar(h3,'Task','1/13/2001','1/15/2001','K3',Nil);
		h1 := AddItem('Task 1');
		AddItem('');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/7/2001','1/9/2001','K2',Nil);
		AddItem('');
		AddLink('L1',h1,'K1',h2,'K2');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['<*>',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(0);
	end;
	EndUpdate();
end
1782
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
		with Bars.Copy('Progress','TProgressD') do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeThinDown;
		end;
		with Bars.Copy('Progress','TProgressC') do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
		with Bars.Copy('Progress','TProgressU') do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeThinUp;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','9/25/2006','9/30/2006','T1',Nil);
		AddBar(h,'TProgressU','9/25/2006','10/4/2006','TP1',Nil);
		GroupBars(h,'T1',True,h,'TP1',True,TObject(3),Nil);
		ItemBar[h,'TP1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<font ;6>progress up';
		h := AddItem('Task');
		AddBar(h,'Task','9/26/2006','10/1/2006','T2',Nil);
		AddBar(h,'TProgressC','9/26/2006','10/5/2006','TP2',Nil);
		GroupBars(h,'T2',True,h,'TP2',True,TObject(3),Nil);
		ItemBar[h,'TP2',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<font ;6>progress center';
		h := AddItem('Task');
		AddBar(h,'Task','9/25/2006','9/30/2006','T3',Nil);
		AddBar(h,'TProgressD','9/25/2006','10/6/2006','TP3',Nil);
		GroupBars(h,'T3',True,h,'TP3',True,TObject(3),Nil);
		ItemBar[h,'TP3',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<font ;6>progress down';
	end;
	EndUpdate();
end
1781
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Indent := 11;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	Items.AllowCellValueToItemBar := True;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(544);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(546);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 224;
		with Bars do
		begin
			with Add('Underline') do
			begin
				Color := $ff0000;
				Shape := EXG2ANTTLib.ShapeBarEnum.exShapeThinDown;
			end;
			with Add('Task:Underline') do
			begin
				Shortcut := 'T';
				Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
			end;
		end;
	end;
	with Items do
	begin
		h := AddItem('Project');
		AddBar(h,'Summary','9/21/2006','10/3/2006',Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'T','9/21/2006','9/24/2006',Nil,Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		AddBar(h2,'T','9/24/2006','9/28/2006',Nil,Nil);
		h3 := InsertItem(h,Nil,'Task 3');
		AddBar(h3,'T','9/28/2006','10/3/2006',Nil,Nil);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart] := '9/22/2006';
	end;
	EndUpdate();
end
1780
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Indent := 11;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	Items.AllowCellValueToItemBar := True;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(544);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(545);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 224;
	end;
	with Items do
	begin
		h := AddItem('Project');
		AddBar(h,'Summary','9/21/2006','10/3/2006',Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/24/2006',Nil,Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		AddBar(h2,'Task','9/24/2006','9/28/2006',Nil,Nil);
		h3 := InsertItem(h,Nil,'Task 3');
		AddBar(h3,'Task','9/28/2006','10/3/2006',Nil,Nil);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart] := '9/22/2006';
	end;
	EndUpdate();
end
1779
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<A*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEndInclusive] := '1/2/2001';
	end;
	EndUpdate();
end
1778
Is it possible to programmatically move all bars to end at specified date (inclusive)

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEndInclusive] := '1/2/2001';
	end;
	EndUpdate();
end
1777
Is it possible to programmatically move all bars of specified key to end at specified date

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<A*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEnd] := '1/2/2001';
	end;
	EndUpdate();
end
1776
Is it possible to programmatically move all bars to end at specified date

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEnd] := '1/2/2001';
	end;
	EndUpdate();
end
1775
Is it possible to programmatically move all bars of specified key to start at specified date

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<A*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart] := '1/2/2001';
	end;
	EndUpdate();
end
1774
Is it possible to programmatically move all bars to start at specified date

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart] := '1/2/2001';
	end;
	EndUpdate();
end
1773
Is it possible to programmatically move all bars of specified key

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<A*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMove] := TObject(2);
	end;
	EndUpdate();
end
1772
Is it possible to programmatically move all bars

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		AddBar(AddItem('Task A.1'),'Task','1/1/2001','1/6/2001','A',Nil);
		AddBar(AddItem('Task A.2'),'Task','1/2/2001','1/7/2001','A',Nil);
		AddBar(AddItem('Task B.1'),'Task','1/3/2001','1/8/2001','B',Nil);
		AddBar(AddItem('Task B.2'),'Task','1/4/2001','1/9/2001','B',Nil);
		ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarMove] := TObject(2);
	end;
	EndUpdate();
end
1771
How can I programmatically move a bar, so it ends at specified date (inclusive)
with AxG2antt1 do
begin
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/1/2001','1/6/2001','A',Nil);
		ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEndInclusive] := '1/4/2001';
	end;
end
1770
How can I programmatically move a bar, so it ends at specified date
with AxG2antt1 do
begin
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/1/2001','1/6/2001','A',Nil);
		ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEnd] := '1/4/2001';
	end;
end
1769
How can I programmatically move a bar, so it starts at specified date
with AxG2antt1 do
begin
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/1/2001','1/6/2001','A',Nil);
		ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart] := '1/4/2001';
	end;
end
1768
I can’t figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 22;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2016';
		PaneWidth[False] := 0;
		LevelCount := 2;
		DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
		AllowResizeChart := Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader);
		MaxUnitWidth := 196;
		with Level[0] do
		begin
			Alignment := Integer(EXG2ANTTLib.AlignmentEnum.exHOutside) Or Integer(EXG2ANTTLib.AlignmentEnum.CenterAlignment);
			DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
		end;
		with Level[1] do
		begin
			DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelDotLine);
			DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
			BackColor := $f0f0f0;
		end;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible;
		AllowOverviewZoom := EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom;
		UnitWidth := 24;
		Label[EXG2ANTTLib.UnitEnum.exSecond] := '';
		Label[EXG2ANTTLib.UnitEnum.exMinute] := '';
		Label[EXG2ANTTLib.UnitEnum.exHour] := '';
		Label[EXG2ANTTLib.UnitEnum.exWeek] := '';
		Label[EXG2ANTTLib.UnitEnum.exDay] := '<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><of' + 
	'f -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096';
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		ScrollTo(FirstVisibleDate,TObject(1));
	end;
	Columns.Add('Default');
	EndUpdate();
end
1767
Can I use GroupBars with OverlaidType method

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	Debug := True;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	ScrollBySingleLine := True;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 96;
		Bars.Item['Task'].OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	end;
	with Items do
	begin
		h := AddItem('Project');
		AddBar(h,'Summary','9/21/2006','10/4/2006',Nil,Nil);
		h1 := InsertItem(h,Nil,'Tasks');
		AddBar(h1,'Task','9/21/2006','9/26/2006','h1',Nil);
		h2 := h1;
		AddBar(h2,'Task','9/25/2006','9/30/2006','h2',Nil);
		AddLink('L1',h1,'h1',h2,'h2');
		h3 := h1;
		AddBar(h3,'Task','9/29/2006','10/4/2006','h3',Nil);
		AddLink('L2',h2,'h2',h3,'h3');
		DefineSummaryBars(h,'',h1,'h1');
		DefineSummaryBars(h,'',h2,'h2');
		DefineSummaryBars(h,'',h3,'h3');
		ExpandItem[h] := True;
		ItemBold[h] := True;
		GroupBars(h1,'h1',False,h2,'h2',True,TObject(31),'0;5;-1');
		GroupBars(h2,'h2',False,h3,'h3',True,TObject(31),'0;5;-1');
	end;
	EndUpdate();
end
1766
How do I change the link's lag so I can schedule bars to start later (with nonworking part)

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TWinForm1.AxG2antt1_BarResizing(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent);
begin
	with AxG2antt1 do
	begin
		Items.SchedulePDM(e.item,TObject(e.key));
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 22;
	HeaderHeight := DefaultItemHeight;
	BackColorLevelHeader := BackColor;
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid;
		LinksColor := $808080;
		LevelCount := 2;
		FirstVisibleDate := '12/28/2000';
		PaneWidth[False] := 48;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $0;
			StartColor := $bebebe;
			EndColor := StartColor;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/5/2001','K1','FS lag=0 (default)');
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/5/2001','K2','FS lag=4');
		AddLink('L1',h1,'K1',h2,'K2');
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/5/2001','K3','FS lag=-1');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['L2',EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay] := TObject(4);
		h4 := AddItem('Task 4');
		AddBar(h4,'Task','1/2/2001','1/5/2001','K4',Nil);
		AddLink('L3',h3,'K3',h4,'K4');
		Link['L3',EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay] := TObject(-1);
		SchedulePDM(0,'K1');
	end;
	EndUpdate();
end
1765
How do I change the link's lag so I can schedule bars to start later (without nonworking part)

// BarResizing event - Occurs when a bar is moving or resizing.
procedure TWinForm1.AxG2antt1_BarResizing(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent);
begin
	with AxG2antt1 do
	begin
		Items.SchedulePDM(e.item,TObject(e.key));
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 22;
	HeaderHeight := DefaultItemHeight;
	BackColorLevelHeader := BackColor;
	AntiAliasing := True;
	Columns.Add('Task');
	with Chart do
	begin
		LinksStyle := EXG2ANTTLib.LinkStyleEnum.exLinkSolid;
		LinksColor := $808080;
		LevelCount := 2;
		NonworkingDays := 0;
		FirstVisibleDate := '12/28/2000';
		PaneWidth[False] := 48;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
			Color := $0;
			StartColor := $bebebe;
			EndColor := StartColor;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/5/2001','K1','FS lag=0 (default)');
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/2/2001','1/5/2001','K2','FS lag=4');
		AddLink('L1',h1,'K1',h2,'K2');
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','1/2/2001','1/5/2001','K3','FS lag=-1');
		AddLink('L2',h2,'K2',h3,'K3');
		Link['L2',EXG2ANTTLib.LinkPropertyEnum.exLinkPDMDelay] := TObject(4);
		h4 := AddItem('Task 4');
		AddBar(h4,'Task','1/2/2001','1/5/2001','K4',Nil);
		AddLink('L3',h3,'K3',h4,'K4');
		Link['L3',EXG2ANTTLib.LinkPropertyEnum.exLinkPDMDelay] := TObject(-1);
		SchedulePDM(0,'K1');
	end;
	EndUpdate();
end
1764
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// MouseDown event - Occurs when the user presses a mouse button.
procedure TWinForm1.AxG2antt1_MouseDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent);
begin
	with AxG2antt1 do
	begin
		i := get_ItemFromPoint(-1,-1,c,hit);
		FullRowSelect := Columns.Item[TObject(c)].Data;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 22;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Flat;
	BackColorLock := Color.FromArgb(240,240,240);
	BackColorHeader := BackColorLock;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
	ColumnAutoResize := False;
	SortBarVisible := False;
	AllowGroupBy := True;
	ReadOnly := EXG2ANTTLib.ReadOnlyEnum.exReadOnly;
	ShowFocusRect := False;
	CountLockedColumns := 1;
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragScroll;
	SingleSort := False;
	ColumnsAllowSizing := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid;
	GridLineColor := Color.FromArgb(220,220,220);
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.LevelCount := 2;
	Chart.PaneWidth[False] := 256;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Columns.Item[TObject(0)].Data := TObject(-1);
	Layout := 'singlesort="C5:1";multiplesort=" C1:2"';
	EndUpdate();
end
1763
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
procedure TWinForm1.AxG2antt1_BeforeExpandItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BeforeExpandItemEvent);
begin
	with AxG2antt1 do
	begin
		set_EventParam(1,TObject(True));
	end
end;

// Event event - Notifies the application once the control fires an event.
procedure TWinForm1.AxG2antt1_Event(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_EventEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( get_EventParam(-2) );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root A');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root B');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1762
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		MarkSelectDateColor := BackColor;
		MarkTodayColor := BackColor;
	end;
	EndUpdate();
end
1761
Is it possible to search for a bar through items only ( not including the locked items )

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		FirstVisibleDate := '12/31/2015';
	end;
	BackColorAlternate := Color.FromArgb(250,250,250);
	ShowLockedItems := True;
	Columns.Add('Column');
	with (Columns.Add('Find') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Visible := False;
		FormatColumn := 'int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ';
	end;
	Chart.ColumnsFormatLevel := '1';
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0];
		CellValue[TObject(h),TObject(0)] := 'locked-top 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T1',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,1];
		CellValue[TObject(h),TObject(0)] := 'locked-top 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T2',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,2];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		AddBar(AddItem('un-locked item 1'),'Task','1/4/2016','1/8/2016','T3',Nil);
		AddBar(AddItem('un-locked item 2'),'Task','1/5/2016','1/9/2016','T4',Nil);
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exMiddle] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,0];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,1];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T5',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,2];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T6',Nil);
	end;
	with Items do
	begin
		h := FindBar['T4',TObject(0)];
		ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		CellValue[TObject(h),TObject(1)] := TObject(h);
	end;
	EndUpdate();
end
1760
Is it possible to search for a bar through bottom-locked-items only

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		FirstVisibleDate := '12/31/2015';
	end;
	BackColorAlternate := Color.FromArgb(250,250,250);
	ShowLockedItems := True;
	Columns.Add('Column');
	with (Columns.Add('Find') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Visible := False;
		FormatColumn := 'int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ';
	end;
	Chart.ColumnsFormatLevel := '1';
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0];
		CellValue[TObject(h),TObject(0)] := 'locked-top 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T1',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,1];
		CellValue[TObject(h),TObject(0)] := 'locked-top 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T2',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,2];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		AddBar(AddItem('un-locked item 1'),'Task','1/4/2016','1/8/2016','T3',Nil);
		AddBar(AddItem('un-locked item 2'),'Task','1/5/2016','1/9/2016','T4',Nil);
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exMiddle] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,0];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,1];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T5',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,2];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T6',Nil);
	end;
	with Items do
	begin
		h := FindBar['T6',TObject(-4)];
		ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		CellValue[TObject(h),TObject(1)] := TObject(h);
	end;
	EndUpdate();
end
1759
Is it possible to search for a bar through top-locked-items only

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		FirstVisibleDate := '12/31/2015';
	end;
	BackColorAlternate := Color.FromArgb(250,250,250);
	ShowLockedItems := True;
	Columns.Add('Column');
	with (Columns.Add('Find') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Visible := False;
		FormatColumn := 'int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ';
	end;
	Chart.ColumnsFormatLevel := '1';
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0];
		CellValue[TObject(h),TObject(0)] := 'locked-top 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T1',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,1];
		CellValue[TObject(h),TObject(0)] := 'locked-top 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T2',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,2];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		AddBar(AddItem('un-locked item 1'),'Task','1/4/2016','1/8/2016','T3',Nil);
		AddBar(AddItem('un-locked item 2'),'Task','1/5/2016','1/9/2016','T4',Nil);
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exMiddle] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,0];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,1];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T5',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,2];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T6',Nil);
	end;
	with Items do
	begin
		h := FindBar['T1',TObject(-3)];
		ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		CellValue[TObject(h),TObject(1)] := TObject(h);
	end;
	EndUpdate();
end
1758
Is it possible to search for a bar through all locked-items only

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		FirstVisibleDate := '12/31/2015';
	end;
	BackColorAlternate := Color.FromArgb(250,250,250);
	ShowLockedItems := True;
	Columns.Add('Column');
	with (Columns.Add('Find') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Visible := False;
		FormatColumn := 'int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ';
	end;
	Chart.ColumnsFormatLevel := '1';
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0];
		CellValue[TObject(h),TObject(0)] := 'locked-top 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T1',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,1];
		CellValue[TObject(h),TObject(0)] := 'locked-top 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T2',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,2];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		AddBar(AddItem('un-locked item 1'),'Task','1/4/2016','1/8/2016','T3',Nil);
		AddBar(AddItem('un-locked item 2'),'Task','1/5/2016','1/9/2016','T4',Nil);
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exMiddle] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,0];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,1];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T5',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,2];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T6',Nil);
	end;
	with Items do
	begin
		h := FindBar['T2',TObject(-2)];
		ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		CellValue[TObject(h),TObject(1)] := TObject(h);
	end;
	EndUpdate();
end
1757
Is it possible to search for a bar through all items ( including locked items )

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		FirstVisibleDate := '12/31/2015';
	end;
	BackColorAlternate := Color.FromArgb(250,250,250);
	ShowLockedItems := True;
	Columns.Add('Column');
	with (Columns.Add('Find') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		Visible := False;
		FormatColumn := 'int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ';
	end;
	Chart.ColumnsFormatLevel := '1';
	with Items do
	begin
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0];
		CellValue[TObject(h),TObject(0)] := 'locked-top 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T1',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,1];
		CellValue[TObject(h),TObject(0)] := 'locked-top 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T2',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,2];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		AddBar(AddItem('un-locked item 1'),'Task','1/4/2016','1/8/2016','T3',Nil);
		AddBar(AddItem('un-locked item 2'),'Task','1/5/2016','1/9/2016','T4',Nil);
		LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exMiddle] := 3;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,0];
		SelectItem[h] := False;
		ItemDivider[h] := 0;
		ItemHeight[h] := 2;
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,1];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 1';
		AddBar(h,'Task','1/4/2016','1/8/2016','T5',Nil);
		h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exMiddle,2];
		CellValue[TObject(h),TObject(0)] := 'locked-bottom 2';
		AddBar(h,'Task','1/5/2016','1/9/2016','T6',Nil);
	end;
	with Items do
	begin
		h := FindBar['T5',TObject(-1)];
		ItemBar[h,FirstItemBar[h],EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
		CellValue[TObject(h),TObject(1)] := TObject(h);
	end;
	EndUpdate();
end
1756
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Clip');
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	with Chart do
	begin
		AllowResizeChart := Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader);
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
		FirstVisibleDate := '12/23/2000';
		LevelCount := 2;
		PaneWidth[False] := 216;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
			Color := $a4a4a4;
			StartColor := $f0f0f0;
			EndColor := StartColor;
			OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
			Height := 15;
		end;
		MinUnitWidth := UnitWidth;
	end;
	with Items do
	begin
		h := AddItem('no clip, (0-2)');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1','no clip, right(<b>2</b>)');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(2);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2','no clip, center(<b>1</b>)');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(1);
		AddBar(h,'Task','1/2/2001','1/4/2001','K3','no clip, left(<b>0</b>)');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(0);
		h := AddItem('clip, inside (3-5)');
		AddBar(h,'Task','12/28/2000','1/8/2001','K1','clip, inside, right(<b>5</b>)');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(5);
		AddBar(h,'Task','12/28/2000','1/8/2001','K2','clip, inside, center(<b>4</b>)');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(4);
		AddBar(h,'Task','12/28/2000','1/8/2001','K3','clip, inside, left(<b>3</b>)');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(3);
		h := AddItem('hide on min width, clip if not fit, inside (6-8)');
		AddBar(h,'Task','12/26/2000','1/10/2001','K1','hide on min width, clip if not fit, inside, right(<b>8</b>)');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(8);
		AddBar(h,'Task','12/26/2000','1/10/2001','K2','hide on min width, clip if not fit, inside, center(<b>7</b>)');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(7);
		AddBar(h,'Task','12/26/2000','1/10/2001','K3','hide on min width, clip if not fit, inside, left(<b>6</b>)');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(6);
		h := AddItem('hide if not fit, no clip, inside (9-11)');
		AddBar(h,'Task','12/28/2000','1/8/2001','K1','hide if not fit, no clip, inside, right(<b>11</b>)');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(11);
		AddBar(h,'Task','12/28/2000','1/8/2001','K2','hide if not fit, no clip, center(<b>10</b>)');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(10);
		AddBar(h,'Task','12/28/2000','1/8/2001','K3','hide if not fit, no clip, inside, left(<b>9</b>)');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(9);
		h := AddItem('no clip, inside, outside (12-14)');
		AddBar(h,'Task','12/28/2000','1/8/2001','K1','no clip, inside, outside, right(<b>14</b>)');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(14);
		AddBar(h,'Task','12/28/2000','1/8/2001','K2','no clip, inside, outside, center(<b>13</b>)');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(13);
		AddBar(h,'Task','12/28/2000','1/8/2001','K3','no clip, inside, outside, left(<b>12</b>)');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(12);
		h := AddItem('no clip, outside (16-18)');
		AddBar(h,'Task','12/30/2000','1/6/2001','K1','no clip, outside, right(<b>18</b>)');
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		AddBar(h,'Task','12/30/2000','1/6/2001','K2','no clip, outside, center(<b>17</b>)');
		ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(17);
		AddBar(h,'Task','12/30/2000','1/6/2001','K3','no clip, outside, left(<b>16</b>)');
		ItemBar[h,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(16);
	end;
	EndUpdate();
end
1755
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
// DateChange event - Occurs when the first visible date is changed.
procedure TWinForm1.AxG2antt1_DateChange(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Chart.FirstVisibleDate := '1/2/2001';
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/2/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
		ColumnsFormatLevel := '1[bg=12500670]:52,|,2[bg=12500670]:52';
		ColumnsTransparent := 50;
		ScrollBar := False;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
1754
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
// BarResizing event - Occurs when a bar is moving or resizing.
procedure TWinForm1.AxG2antt1_BarResizing(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemBar[e.item,TObject(e.key),EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart] := '1/1/2001';
			ItemBar[e.item,TObject(e.key),EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd] := '2/1/2001';
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/2/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
		ColumnsFormatLevel := '1[bg=12500670]:52,|,2[bg=12500670]:52';
		ColumnsTransparent := 50;
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exStartDate] := '1/1/2001';
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exEndDate] := '1/31/2001';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
1753
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/2/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
		ColumnsFormatLevel := '1[bg=12500670]:52,|,2[bg=12500670]:52';
		ColumnsTransparent := 50;
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exStartDate] := '1/1/2001';
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exEndDate] := '1/31/2001';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
1752
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(0);
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		OutputDebugString( Version );
		Foreground := -1;
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
1751
The week number is not correct (wrong). What can I do

with AxG2antt1 do
begin
	with Chart do
	begin
		FirstWeekDay := LocFirstWeekDay;
		MonthNames := LocMonthNames;
		WeekDays := LocWeekDays;
		AMPM := LocAMPM;
		LevelCount := 2;
		PaneWidth[False] := 0;
		UnitScale := EXG2ANTTLib.UnitEnum.exWeek;
		UnitWidth := 32;
		FirstVisibleDate := '1/1/2016';
		AdjustLevelsToBase := True;
		WeekNumberAs := EXG2ANTTLib.WeekNumberAsEnum.exISO8601WeekNumber;
		ShowNonworkingDates := False;
		ScrollTo(FirstVisibleDate,TObject(1));
	end;
end
1750
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
// ChartEndChanging event - Occurs after the chart has been changed.
procedure TWinForm1.AxG2antt1_ChartEndChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			OutputDebugString( 'FirstVisibleDate' );
			OutputDebugString( FirstVisibleDate );
			OutputDebugString( 'UnitScale' );
			OutputDebugString( UnitScale );
			OutputDebugString( 'UnitWidth' );
			OutputDebugString( UnitWidth );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 3;
		AllowResizeChart := Integer(EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle) Or Integer(EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader);
		PaneWidth[False] := 0;
		MarkTodayColor := BackColor;
	end;
	EndUpdate();
end
1749
The first week number is not correctly assigned. What can I do

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2016';
		LevelCount := 2;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		UnitScale := EXG2ANTTLib.UnitEnum.exWeek;
		ScrollTo(FirstVisibleDate,TObject(1));
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		AdjustLevelsToBase := True;
		Level[0].Label := '<c><%mmmm%>';
	end;
end
1748
How can I display the +/- expand - collapse buttons, a bit larger

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(3,'c:\exontrol\images\normal.ebn');
		Add(4,'c:\exontrol\images\pushed.ebn');
		Add(1,'CP:3 -4 -4 4 4');
		Add(2,'CP:4 -4 -4 4 4');
	end;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot;
	HasButtons := EXG2ANTTLib.ExpandButtonEnum.exCustom;
	set_HasButtonsCustom(False,16777216);
	set_HasButtonsCustom(True,33554432);
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child');
	end;
	EndUpdate();
end
1747
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent.
procedure TWinForm1.AxG2antt1_AllowAutoDrag(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AllowAutoDragEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( 'NewParent' );
			OutputDebugString( CellCaption[TObject(e.newParent),TObject(0)] );
			OutputDebugString( 'After' );
			OutputDebugString( CellCaption[TObject(e.insertA),TObject(0)] );
			OutputDebugString( 'Before' );
			OutputDebugString( CellCaption[TObject(e.insertB),TObject(0)] );
		end;
		e.cancel := True;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	AutoDrag := EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exThinLine;
	ShowFocusRect := False;
	Columns.Add('Task');
	with Chart do
	begin
		ShowNonworkingDates := False;
		FirstVisibleDate := '12/29/2000';
		PaneWidth[False] := 96;
		LevelCount := 2;
	end;
	with Items do
	begin
		h := AddItem('Group 1');
		ItemDivider[h] := 0;
		ItemBold[h] := True;
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'L1';
		h3 := InsertItem(h,Nil,'Task 3');
		AddBar(h3,'Task','1/8/2001','1/10/2001','K3',Nil);
		AddLink('L2',h2,'K2',h3,'K3');
		Link['L2',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'L2';
		ExpandItem[h] := True;
		h := AddItem('Group 2');
		ItemBold[h] := True;
		ItemDivider[h] := 0;
	end;
	EndUpdate();
end
1746
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/2/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
		ColumnsFormatLevel := '1[bg=12500670]:52,|,2[bg=12500670]:52';
		ColumnsTransparent := 50;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
1745
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/2/2001';
		LevelCount := 2;
		PaneWidth[False] := 48;
		ColumnsFormatLevel := '1[bg=12500670]:52,|,2[bg=12500670]:52';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
1744
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Start') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
		Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(12500670);
	end;
	with (Columns.Add('End') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
		Visible := False;
		Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(12500670);
	end;
	with Chart do
	begin
		FirstVisibleDate := '12/31/2000';
		LevelCount := 2;
		PaneWidth[False] := 48;
		ColumnsFormatLevel := '1:52,|,2:52';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2001','1/8/2001',Nil,Nil);
	end;
	EndUpdate();
end
1743
How can I display the control's content on an single A3 paper size, when using PDF format

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	AntiAliasing := True;
	with Chart do
	begin
		FirstVisibleDate := '12/24/2000';
		PaneWidth[False] := 96;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
			Color := $0;
			Height := 16;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','12/25/2000','1/5/2001','1','<fgcolor=FFFFFF>Center');
		ItemBar[h,'1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'left';
		ItemBar[h,'1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/5/2001','1/16/2001','1','<fgcolor=FFFFFF>Center');
		h := AddItem('Task 3');
		AddBar(h,'Task','1/16/2001','1/26/2001','2','Center');
		ItemBar[h,'2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'right';
		ItemBar[h,'2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(18);
	end;
	with Chart.Notes do
	begin
		with Add('1S',TObject(AxG2antt1.Items.ItemByIndex[1]),'1','<%m3%>-<%d%>') do
		begin
			PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
			PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -16;
			PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 4;
		end;
		with Add('1F',TObject(AxG2antt1.Items.ItemByIndex[1]),'1','<%m3%>-<%d%>') do
		begin
			RelativePosition := TObject(1);
			PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
			PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 16;
			PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -4;
		end;
	end;
	var_CopyTo := get_CopyTo('C:\Temp\Preview.pdf|11.69 in x 16.53 in||single');
	OutputDebugString( 'Look for C:\Temp\Preview.pd file.' );
	EndUpdate();
end
1742
How can I display the control's content on an A3 paper size, when using PDF format

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	AntiAliasing := True;
	with Chart do
	begin
		FirstVisibleDate := '12/24/2000';
		PaneWidth[False] := 96;
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
			Color := $0;
			Height := 16;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','12/25/2000','1/5/2001','1','<fgcolor=FFFFFF>Center');
		ItemBar[h,'1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'left';
		ItemBar[h,'1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/5/2001','1/16/2001','1','<fgcolor=FFFFFF>Center');
		h := AddItem('Task 3');
		AddBar(h,'Task','1/16/2001','1/26/2001','2','Center');
		ItemBar[h,'2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'right';
		ItemBar[h,'2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(18);
	end;
	with Chart.Notes do
	begin
		with Add('1S',TObject(AxG2antt1.Items.ItemByIndex[1]),'1','<%m3%>-<%d%>') do
		begin
			PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
			PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -16;
			PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 4;
		end;
		with Add('1F',TObject(AxG2antt1.Items.ItemByIndex[1]),'1','<%m3%>-<%d%>') do
		begin
			RelativePosition := TObject(1);
			PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
			PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 16;
			PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -4;
		end;
	end;
	var_CopyTo := get_CopyTo('C:\Temp\Preview.pdf|11.69 in x 16.53 in');
	OutputDebugString( 'Look for C:\Temp\Preview.pd file.' );
	EndUpdate();
end
1741
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemBold[e.item] := True;
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(1)],CellValue[TObject(e.item),TObject(2)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	AllowGroupBy := True;
	SortBarVisible := True;
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			AllowGroupBy := False;
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			AllowGroupBy := False;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		LevelCount := 2;
		PaneWidth[False] := 256;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('1'),'Task','9/21/2006','9/27/2006',Nil,Nil);
		AddBar(AddItem('1'),'Task','9/22/2006','9/28/2006',Nil,Nil);
		AddBar(AddItem('2'),'Task','9/22/2006','9/28/2006',Nil,Nil);
		AddBar(AddItem('2'),'Task','9/23/2006','9/29/2006',Nil,Nil);
		AddBar(AddItem('3'),'Task','9/25/2006','9/29/2006',Nil,Nil);
		AddBar(AddItem('3'),'Task','9/26/2006','9/30/2006',Nil,Nil);
	end;
	with (Columns.Add('Tasks - Group') as EXG2ANTTLib.Column) do
	begin
		Visible := False;
		FormatColumn := '%0 in (1,2) ? `1 - 2` : `3 -`';
		SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	end;
	EndUpdate();
end
1740
How can I filter the chart and its content, not the items section

// RClick event - Fired when right mouse button is clicked
procedure TWinForm1.AxG2antt1_RClick(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Columns.Item['Start'].ShowFilter('-1,-1,128,128');
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SortBarVisible := True;
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			DisplayFilterDate := True;
			DisplayFilterPattern := False;
			FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox);
			Visible := False;
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			DisplayFilterDate := True;
			DisplayFilterPattern := False;
			Visible := False;
			FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox);
			Visible := False;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		LevelCount := 2;
		PaneWidth[False] := 128;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/27/2006',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/28/2006',Nil,Nil);
		AddBar(AddItem('Task 3'),'Task','9/22/2006','9/28/2006',Nil,Nil);
		AddBar(AddItem('Task 4'),'Task','9/23/2006','9/29/2006',Nil,Nil);
		AddBar(AddItem('Task 5'),'Task','9/25/2006','9/29/2006',Nil,Nil);
		AddBar(AddItem('Task 6'),'Task','9/26/2006','9/30/2006',Nil,Nil);
	end;
	EndUpdate();
end
1739
How do I enable the Group-By feature

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemBackColor[e.item] := $f0f0f0;
			AxG2antt1.Chart.ItemBackColor[e.item] := $f0f0f0;
			ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine;
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(1)],CellValue[TObject(e.item),TObject(2)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	AllowGroupBy := True;
	SortBarVisible := True;
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			AllowGroupBy := False;
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			AllowGroupBy := False;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		LevelCount := 2;
		PaneWidth[False] := 256;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/27/2006',Nil,Nil);
		AddBar(AddItem('Task 1'),'Task','9/22/2006','9/28/2006',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/28/2006',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','9/23/2006','9/29/2006',Nil,Nil);
		AddBar(AddItem('Task 3'),'Task','9/25/2006','9/29/2006',Nil,Nil);
		AddBar(AddItem('Task 3'),'Task','9/26/2006','9/30/2006',Nil,Nil);
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
1738
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)

// SelectionChanged event - Fired after a new item has been selected.
procedure TWinForm1.AxG2antt1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			OutputDebugString( CellCaption[TObject(FocusItem),TObject(0)] );
			OutputDebugString( ItemBar[FocusItem,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarWorkingCount] );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	SelBackColor := Color.FromArgb(142,190,255);
	SelForeColor := Color.FromArgb(0,0,0);
	with Chart do
	begin
		PaneWidth[False] := 96;
		FirstVisibleDate := '1/1/2002';
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'Task';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%258%><font ;6><off 3>w/units';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
		SelBackColor := AxG2antt1.SelBackColor;
	end;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Task A');
		AddBar(h,'Task','1/2/2002','1/9/2002',Nil,Nil);
		h := AddItem('Task B');
		AddBar(h,'Task','1/3/2002','1/8/2002',Nil,Nil);
		SelectItem[h] := True;
		h := AddItem('Task C');
		AddBar(h,'Task','1/4/2002','1/5/2002',Nil,Nil);
	end;
	EndUpdate();
end
1737
How do i verify weather specified unit is Nonworking Working Unit

// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
	with AxG2antt1 do
	begin
		h := get_ItemFromPoint(-1,-1,c,hit);
		d := Chart.DateFromPoint[-1,-1];
		OutputDebugString( d );
		OutputDebugString( Chart.IsNonworkingDate[TObject(d),TObject(h)] );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('NonWorking');
	with Chart do
	begin
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		FirstVisibleDate := '1/24/2008';
		PaneWidth[False] := 64;
		LevelCount := 2;
	end;
	with Items do
	begin
		h := AddItem('Default');
		h := AddItem('January');
		ItemNonworkingUnits[h,TObject(False)] := 'month(value) = 1';
		h := AddItem('February, Saturday, Sunday');
		ItemNonworkingUnits[h,TObject(False)] := 'month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)';
		h := AddItem('Sunday');
		ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) = 0';
	end;
	EndUpdate();
end
1736
How can I specify the bar's caption to be caption from a column/cell

// Change event - Occurs when the user changes the cell's content.
procedure TWinForm1.AxG2antt1_Change(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChangeEvent);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 64;
		with Bars.Item['Task'] do
		begin
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<fgcolor=808080><%=%C0%>';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		end;
	end;
	with (Columns.Add('Task') as EXG2ANTTLib.Column).Editor do
	begin
		EditType := EXG2ANTTLib.EditTypeEnum.DropDownListType;
		AddItem(1,'Aka',Nil);
		AddItem(2,'Baka',Nil);
		AddItem(3,'Taka',Nil);
	end;
	with Items do
	begin
		AddBar(AddItem(TObject(1)),'Task','1/2/2001','1/5/2001',Nil,Nil);
		AddBar(AddItem(TObject(2)),'Task','1/3/2001','1/6/2001',Nil,Nil);
		AddBar(AddItem(TObject(3)),'Task','1/4/2001','1/7/2001',Nil,Nil);
	end;
	EndUpdate();
end
1735
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (Columns.Add('Effort') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(21);
		Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
	end;
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 96;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 128;
		HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverload;
			HistogramCriticalValue := 3;
			ShowHistogramValues := 'value>3?255:1';
			HistogramItems := -11;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
			FormatHistogramValues := '(value format `0`) + ` units`';
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/23/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(6.79);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/26/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(3.19);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','6/29/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005',Nil,Nil);
		CellValue[TObject(h1),TObject(1)] := TObject(1);
	end;
	EndUpdate();
end
1734
How can I create a relative time-scale

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 24;
	HeaderHeight := DefaultItemHeight;
	GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot;
	BackColorLevelHeader := BackColor;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
		GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid;
		PaneWidth[False] := 128;
		LevelCount := 2;
		FirstVisibleDate := TObject(0);
		NonworkingDays := 0;
		UnitWidth := 36;
		with Level[0] do
		begin
			Unit := EXG2ANTTLib.UnitEnum.exDay;
			Count := 6;
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Label := '<%i%>';
			FormatLabel := '''<b>'' + ( (value / 6)  array (''Jan'',''Feb'',''Mar'',''Apr'',''May'',''Jun'',''Jul'',''Aug'',''Sep'',''Oct'',''Nov'',''Dec'') ) + ''-16''';
		end;
		with Level[1] do
		begin
			Label := '<%i%>';
			FormatLabel := '1 + value mod 6 + ` `';
			Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
		end;
		AdjustLevelsToBase := True;
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exStartDate] := TObject(0);
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exEndDate] := TObject(95);
		with Bars.Item['Task'] do
		begin
			Height := 15;
			Color := $b4d5fc;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'date blocking';
		end;
	end;
	Columns.Add('Company');
	with Items do
	begin
		h := AddItem('ABC Company');
		ItemBackColor[h] := $f0f0f0;
		AxG2antt1.Chart.ItemBackColor[h] := $f0f0f0;
		hChild := InsertItem(h,Nil,'line 1');
		AddBar(hChild,'Task',TObject(0),TObject(3),Nil,Nil);
		hChild := InsertItem(h,Nil,'line 2');
		AddBar(hChild,'Task',TObject(3),TObject(5),'A',Nil);
		AddBar(hChild,'Task',TObject(7),TObject(10),'B',Nil);
		hChild := InsertItem(h,Nil,'line 3');
		AddBar(hChild,'Task',TObject(5),TObject(8),'A',Nil);
		AddBar(hChild,'Task',TObject(9),TObject(12),'B',Nil);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
1733
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate

with AxG2antt1 do
begin
	BeginUpdate();
	DefaultItemHeight := 32;
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED' + 
	'GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzBJ' + 
	'LxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA=');
		Add(2,'gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED' + 
	'GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8Q' + 
	'AvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA=');
		Add(3,'gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED' + 
	'GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZ' + 
	'LwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA');
		Add(4,'gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED' + 
	'GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZ' + 
	'LwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB');
		RenderType := -16777216;
	end;
	with Chart do
	begin
		PaneWidth[False] := 164;
		FirstVisibleDate := '1/1/2001';
		NonworkingDaysColor := $f0f0f0;
		NonworkingDaysPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
		with Bars.Item['Task'] do
		begin
			Height := 17;
			Color := $ffffff;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(1);
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Task'),'Task','1/2/2001','1/6/2001','',Nil);
		h := AddItem('Task+Rhombus(red)');
		AddBar(h,'Task','1/2/2001','1/7/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(100%-11,50%-6,11,11),back=0x10000FF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := ',,5';
		h := AddItem('Rhombus(red)+Task');
		AddBar(h,'Task','1/2/2001','1/8/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(0,50%-6,11,11),back=0x10000FF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '-5';
		h := AddItem('Task(yellow)+Rhombus(blue)');
		AddBar(h,'Task','1/2/2001','1/9/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(100%-11,50%-6,11,11),back=0x1FF0000]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := ',,5';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65535);
		h := AddItem('Rhombus(blue)+Task(yellow)');
		AddBar(h,'Task','1/2/2001','1/8/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(0,50%-6,11,11),back=0x1FF0000]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '-5';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65535);
		h := AddItem('TriangleUp(white)+Task');
		AddBar(h,'Task','1/2/2001','1/7/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(0,50%-6,11,11),back=0x2FFFFFF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '-5';
		h := AddItem('TriangleUp(blue)+Task(magenta)+TriangleDown(red)');
		AddBar(h,'Task','1/2/2001','1/6/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '-5,0,5,0';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16744703);
		h := AddItem('Rhombus+Task+TriangleDown');
		AddBar(h,'Task','1/2/2001','1/7/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '-5, 0,5,0';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16744448);
		h := AddItem('Rhombus+Task+TriangleDown');
		AddBar(h,'Task','1/2/2001','1/8/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '0,-5,0,5';
		h := AddItem('Task+Star');
		AddBar(h,'Task','1/2/2001','1/9/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(100%-11,0,11,11),back=0x4FFFFFF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := TObject(5);
		h := AddItem('Star+Task');
		AddBar(h,'Task','1/2/2001','1/8/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(0,100%-11,11,11),back=0x04FFFFFF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := TObject(5);
		h := AddItem('Task+Star');
		AddBar(h,'Task','1/2/2001','1/7/2001','',Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt] := 'none[(100%-11,0,11,11),back=0x4FFFFFF]';
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate] := '0,-6,14';
	end;
	EndUpdate();
end
1732
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRh' + 
	'wAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDM' + 
	'RwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA');
		Add(2,'CP:1 0 0 5 0');
		Add(3,'gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZEi' + 
	'aKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3Z' + 
	'zdOIIJgEgIA=');
		RenderType := -16777216;
	end;
	with Chart do
	begin
		PaneWidth[False] := 164;
		FirstVisibleDate := '1/1/2001';
		Bars.Item['Task'].Color := $3ff0000;
		Bars.Copy('Task','NewTask').Height := 15;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		AddBar(h,'NewTask','1/8/2001','1/12/2001','new',Nil);
		h := AddItem('Task+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		AddBar(h,'NewTask','1/8/2001','1/12/2001','new',Nil);
		ItemBar[h,'new',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		h := AddItem('Task/Color+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554687);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
		AddBar(h,'NewTask','1/8/2001','1/12/2001','new',Nil);
		ItemBar[h,'new',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554687);
		ItemBar[h,'new',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
		h := AddItem('Task/Color+Rhombus/Color');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33619712);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16711935);
		AddBar(h,'NewTask','1/8/2001','1/12/2001','new',Nil);
		ItemBar[h,'new',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33619712);
		ItemBar[h,'new',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16711935);
	end;
	EndUpdate();
end
1731
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5Ij' + 
	'qAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI' + 
	'4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI');
		Add(2,'CP:1 -6 0 0 0');
		RenderType := -16777216;
	end;
	with Chart do
	begin
		PaneWidth[False] := 164;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		h := AddItem('Task+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		h := AddItem('Task/Color+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554687);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
		h := AddItem('Task/Color+Rhombus/Color');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33619712);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16711935);
	end;
	EndUpdate();
end
1730
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5Ij' + 
	'qAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI' + 
	'4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI');
		Add(2,'CP:1 -6 0 0 0');
	end;
	with Chart do
	begin
		PaneWidth[False] := 164;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		h := AddItem('Task+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		h := AddItem('Task/Color+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
		h := AddItem('Task/Color+Rhombus/Color');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33619712);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16711935);
	end;
	EndUpdate();
end
1729
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRh' + 
	'wAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDM' + 
	'RwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA');
		Add(2,'CP:1 0 0 6 0');
	end;
	with Chart do
	begin
		PaneWidth[False] := 164;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		h := AddItem('Task+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		h := AddItem('Task/Color+Rhombus');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33554432);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
		h := AddItem('Task/Color+Rhombus/Color');
		AddBar(h,'Task','1/2/2001','1/6/2001',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor] := TObject(33619712);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(16711935);
	end;
	EndUpdate();
end
1728
Is it possible to resize a column with the mouse without changing the width of the next column

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	(Columns.Add('Column 1') as EXG2ANTTLib.Column).Width := 256;
	(Columns.Add('Column 2') as EXG2ANTTLib.Column).Width := 512;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	EndUpdate();
end
1727
How can I align captions of items with checkbox, with items with no checkbox

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with Items do
	begin
		CellImages[TObject(AddItem(TObject(0))),TObject(0)] := '1';
		CellHasCheckBox[TObject(AddItem(TObject(1))),TObject(0)] := True;
		CellImages[TObject(AddItem(TObject(2))),TObject(0)] := '1';
	end;
	EndUpdate();
end
1726
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(0:= (1 rpos '''')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))';
		Visible := False;
	end;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(1 rpos '''') contains ''.''';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 2) != 0',Nil).BackColor := $f0f0f0;
	ConditionalFormats.Add('%C14 = 0',Nil).BackColor := $bebebe;
	EndUpdate();
end
1725
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.PaneWidth[True] := 0;
	HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched;
	HeaderHeight := 24;
	ScrollBySingleLine := True;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
	(Columns.Add('Value') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
	with (Columns.Add('FormatColumn = `%0` ~ CellValue') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '%0';
		Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
	end;
	with (Columns.Add('FormatColumn = `%C0`~ CellCaption') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '%C0';
		Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
	end;
	with Items do
	begin
		AddItem(TObject(1.1234));
		CellValueFormat[TObject(AddItem('<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>.')),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
		with CellEditor[TObject(AddItem(TObject(3))),Nil] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.CheckListType;
			AddItem(1,'Border',Nil);
			AddItem(2,'Thick',Nil);
			AddItem(4,'Shadow',Nil);
		end;
		FormatCell[TObject(AddItem(TObject(10000))),TObject(0)] := '`<b>` + currency(value)';
	end;
	EndUpdate();
end
1724
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(0:= (1 rpos '''')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))';
		Visible := False;
	end;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(1 rpos '''') contains ''.''';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 2) != 0',Nil).BackColor := $f0f0f0;
	ConditionalFormats.Add('%C14 = 0',Nil).BackColor := $bebebe;
	EndUpdate();
end
1723
How can I highlight each group header, with a different background color (method 2)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			ItemBackColor[e.item] := $bebebe;
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
1722
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(0:= (1 rpos '''')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))';
		Visible := False;
	end;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(1 rpos '''') contains ''.''';
		Visible := False;
	end;
	ConditionalFormats.Add('%C14 = 0',Nil).BackColor := $bebebe;
	EndUpdate();
end
1721
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

// Sort event - Fired when the control sorts a column.
procedure TWinForm1.AxG2antt1_Sort(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('P1') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	Chart.PaneWidth[True] := 0;
	with (Columns.Add('P2') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(0:= (1 rpos '''')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C2 mod 2) != 0',Nil).BackColor := $f0f0f0;
	EndUpdate();
end
1720
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '1 apos ''''';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 5) = 1',Nil).BackColor := $808080;
	ConditionalFormats.Add('(%C13 mod 5) = 2',Nil).BackColor := $a4a4a4;
	ConditionalFormats.Add('(%C13 mod 5) = 3',Nil).BackColor := $bebebe;
	ConditionalFormats.Add('(%C13 mod 5) = 4',Nil).BackColor := $f0f0f0;
	EndUpdate();
end
1719
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '1 apos ''''';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 4) = 0',Nil).BackColor := $f0f0f0;
	EndUpdate();
end
1718
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		Refresh();
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	Chart.PaneWidth[False] := 312;
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	Items.AllowCellValueToItemBar := True;
	Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
	Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	with (Columns.Add('Position') as EXG2ANTTLib.Column) do
	begin
		FormatColumn := '(0:= (1 rpos '''')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))';
		Visible := False;
	end;
	ConditionalFormats.Add('(%C13 mod 2) != 0',Nil).BackColor := $f0f0f0;
	EndUpdate();
end
1717
How do I show the chart's labels in 24-hour clock format

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%mmm%> <%d%>, <%yyyy%>';
			Alignment := Integer(EXG2ANTTLib.AlignmentEnum.exHOutside) Or Integer(EXG2ANTTLib.AlignmentEnum.CenterAlignment);
			Unit := EXG2ANTTLib.UnitEnum.exDay;
		end;
		with Level[1] do
		begin
			Label := '<b><%h%>:00</b>';
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXG2ANTTLib.UnitEnum.exHour;
			DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelDefaultLine;
			DrawGridLines := True;
		end;
		with Level[2] do
		begin
			Label := '<%nn%>';
			Unit := EXG2ANTTLib.UnitEnum.exMinute;
			Count := 15;
		end;
		ScrollTo('1/1/2001 8:30:00 AM',TObject(0));
	end;
end
1716
How do I show the chart's labels in 12-hour clock format

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%mmm%> <%d%>, <%yyyy%>';
			Alignment := Integer(EXG2ANTTLib.AlignmentEnum.exHOutside) Or Integer(EXG2ANTTLib.AlignmentEnum.CenterAlignment);
			Unit := EXG2ANTTLib.UnitEnum.exDay;
		end;
		with Level[1] do
		begin
			Label := '<b><%h%>:00</b> <%AM/PM%>';
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXG2ANTTLib.UnitEnum.exHour;
			DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelDefaultLine;
			DrawGridLines := True;
		end;
		with Level[2] do
		begin
			Label := '<%nn%>';
			Unit := EXG2ANTTLib.UnitEnum.exMinute;
			Count := 15;
		end;
		ScrollTo('1/1/2001 8:30:00 AM',TObject(0));
	end;
end
1715
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

// KeyPress event - Occurs when the user presses and releases an ANSI key.
procedure TWinForm1.AxG2antt1_KeyPressEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_KeyPressEvent);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'if .Editying != 0 then' );
		OutputDebugString( Editing );
		e.keyAscii := 0;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := True;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 196;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/25/2006',Nil,Nil);
		AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Nil,Nil);
	end;
	EndUpdate();
end
1714
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
procedure TWinForm1.AxG2antt1_OverviewZoom(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			ScrollTo('1/1/2001',TObject(1));
			OutputDebugString( 'Start' );
			OutputDebugString( StartPrintDate );
			OutputDebugString( 'End' );
			OutputDebugString( EndPrintDate );
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible;
		AllowOverviewZoom := EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom;
		Label[EXG2ANTTLib.UnitEnum.exSecond] := '';
		Label[EXG2ANTTLib.UnitEnum.exMinute] := '';
		Label[EXG2ANTTLib.UnitEnum.exHour] := '';
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		ScrollTo('1/1/2001',TObject(1));
		MarkTimeZone('zone','1/1/2001','1/2/2001',TObject(10516548),Nil);
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','12/15/2000','1/10/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/1/2001','1/5/2001',Nil,Nil);
	end;
	EndUpdate();
end
1713
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 128;
		LevelCount := 2;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible;
		AllowOverviewZoom := EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom;
		Label[EXG2ANTTLib.UnitEnum.exSecond] := '';
		Label[EXG2ANTTLib.UnitEnum.exMinute] := '';
		Label[EXG2ANTTLib.UnitEnum.exHour] := '';
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
	end;
end
1712
How to sort numerically by columns

with AxG2antt1 do
begin
	BeginUpdate();
	(Columns.Add('Numeric') as EXG2ANTTLib.Column).SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
	with Items do
	begin
		AddItem(TObject(1));
		AddItem(TObject(2));
		AddItem(TObject(12));
		AddItem(TObject(22));
	end;
	Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
1711
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
procedure TWinForm1.AxG2antt1_MouseDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent);
begin
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
end;

with AxG2antt1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	SelForeColor := ForeColor;
	with (Columns.Add('Buttons') as EXG2ANTTLib.Column) do
	begin
		Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasButton] := TObject(True);
	end;
	with Items do
	begin
		AddItem('Button A');
		AddItem('Button B');
		AddItem('Button C');
	end;
	EndUpdate();
end
1710
How do I arrange the levels when the user changes the scale using the control's overview part

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
procedure TWinForm1.AxG2antt1_OverviewZoom(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( Chart.UnitScale );
		EnsureVisibleColumn(TObject(0));
		with Chart do
		begin
			Level[0].DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
			ScrollTo('11/18/2015',TObject(1));
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '11/18/2015';
		PaneWidth[False] := 0;
		LevelCount := 2;
		DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
		with Level[0] do
		begin
			Alignment := Integer(EXG2ANTTLib.AlignmentEnum.exHOutside) Or Integer(EXG2ANTTLib.AlignmentEnum.CenterAlignment);
			DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
			BackColor := AxG2antt1.BackColor;
		end;
		with Level[1] do
		begin
			DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelDotLine);
			DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
		end;
		OverviewVisible := EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible;
		AllowOverviewZoom := EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom;
		UnitWidth := 24;
		Label[EXG2ANTTLib.UnitEnum.exSecond] := '';
		Label[EXG2ANTTLib.UnitEnum.exMinute] := '';
		Label[EXG2ANTTLib.UnitEnum.exHour] := '';
		Label[EXG2ANTTLib.UnitEnum.exWeek] := '';
		Label[EXG2ANTTLib.UnitEnum.exDay] := '<|><%d%><|><%d3%>, <%m3%> <%d%>, ''<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096';
		UnitScale := EXG2ANTTLib.UnitEnum.exDay;
		ScrollTo(FirstVisibleDate,TObject(1));
	end;
	Columns.Add('Default');
	EndUpdate();
end
1709
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
			DefineSummaryBars(e.item,'',-3,'');
		end;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
1708
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Chart.ShowCollapsedBars := True;
	EndUpdate();
	Layout := 'multiplesort="C1:1";collapse="0-9999"';
end
1707
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
	BeginUpdate();
	EnsureVisibleColumn(TObject(0));
	Items.ExpandItem[0] := False;
	EndUpdate();
end
1706
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent);
begin
	with AxG2antt1 do
	begin
		Items.ExpandItem[e.item] := False;
	end
end;

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
end
1705
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
	EnsureVisibleColumn(TObject(0));
	BeginUpdate();
	with Items do
	begin
		ExpandItem[RootItem[0]] := False;
		ExpandItem[RootItem[1]] := False;
		ExpandItem[RootItem[2]] := False;
	end;
	EndUpdate();
end
1704
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent);
begin
	with AxG2antt1 do
	begin
		with Items do
		begin
			AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil);
		end;
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '9/1/1994';
	BackColorSortBar := BackColor;
	ColumnAutoResize := False;
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil);
	end;
	DataSource := (rs as ADODB.Recordset);
	SortBarVisible := True;
	SortBarCaption := 'Drag a <b>column</b> header here to group by that column.';
	AllowGroupBy := True;
	Columns.Item[TObject(1)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending;
	EndUpdate();
	BeginUpdate();
	EnsureVisibleColumn(TObject(0));
	with Items do
	begin
		ExpandItem[FirstVisibleItem] := False;
	end;
	EndUpdate();
end
1703
How can I move automatically a bar once another is moved ( non-working bars )

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	Columns.Add('Tasks');
	(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
	(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
		with Bars.Add('Task:Split') do
		begin
			Shortcut := 'TSplit';
			Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
		end;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[TObject(h),TObject(1)] := '9/22/2006';
		CellValue[TObject(h),TObject(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[TObject(h),TObject(1)],CellValue[TObject(h),TObject(2)],Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		CellValue[TObject(h1),TObject(1)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h1),TObject(2)] := '9/26/2006';
		AddBar(h1,'TSplit',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],Nil,Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		CellValue[TObject(h2),TObject(1)] := CellValue[TObject(h1),TObject(2)];
		CellValue[TObject(h2),TObject(2)] := '9/28/2006';
		AddBar(h2,'TSplit',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],Nil,Nil);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Nil,'Task 3');
		CellValue[TObject(h3),TObject(1)] := CellValue[TObject(h2),TObject(2)];
		CellValue[TObject(h3),TObject(2)] := CellValue[TObject(h),TObject(2)];
		AddBar(h3,'TSplit',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],Nil,Nil);
		AddLink('L2',h2,'',h3,'');
		GroupBars(h1,'',False,h2,'',True,TObject(7),Nil);
		GroupBars(h2,'',False,h3,'',True,TObject(7),Nil);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
1702
How can I get notified once the user expands a column

// LayoutChanged event - Occurs when column's position or column's size is changed.
procedure TWinForm1.AxG2antt1_LayoutChanged(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		OutputDebugString( 'Column-Expanded' );
		OutputDebugString( Columns.Item['C0'].Expanded );
	end
end;

with AxG2antt1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	ColumnAutoResize := False;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	BackColorLevelHeader := BackColor;
	with Columns do
	begin
		with (Add('C0') as EXG2ANTTLib.Column) do
		begin
			ExpandColumns := '0,1,2';
			DisplayExpandButton := True;
		end;
		Add('C1');
		Add('C2');
	end;
	with Items do
	begin
		h := AddItem('Cell 0.0');
		CellValue[TObject(h),TObject(1)] := 'Cell 0.1';
		CellValue[TObject(h),TObject(2)] := 'Cell 0.2';
		h := AddItem('Cell 1.0');
		CellValue[TObject(h),TObject(1)] := 'Cell 1.1';
		CellValue[TObject(h),TObject(2)] := 'Cell 1.2';
	end;
	EndUpdate();
end
1701
I am using expandable headers, the question is how I can display the column itself, not just the child columns

with AxG2antt1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
	BackColorLevelHeader := BackColor;
	with Columns do
	begin
		with (Add('C0') as EXG2ANTTLib.Column) do
		begin
			ExpandColumns := '0,1,2';
			DisplayExpandButton := True;
		end;
		Add('C1');
		Add('C2');
	end;
	with Items do
	begin
		h := AddItem('Cell 0.0');
		CellValue[TObject(h),TObject(1)] := 'Cell 0.1';
		CellValue[TObject(h),TObject(2)] := 'Cell 0.2';
		h := AddItem('Cell 1.0');
		CellValue[TObject(h),TObject(1)] := 'Cell 1.1';
		CellValue[TObject(h),TObject(2)] := 'Cell 1.2';
	end;
	EndUpdate();
end